// 本地语言包
import enLocale from "@/lang/dict/en";
import zhCnLocale from "@/lang/dict/zh-cn";
import { deepMerge } from "jmash-core";

// 加载模块lang
export function loadLang(i18n:any) {
  let zhCnLocaleAll = i18n.global.getLocaleMessage("zh-cn");
  zhCnLocaleAll =  deepMerge(zhCnLocaleAll,zhCnLocale)
  let enLocaleAll = i18n.global.getLocaleMessage("en");
  enLocaleAll =  deepMerge(enLocaleAll,enLocale)
  i18n.global.setLocaleMessage("zh-cn", zhCnLocaleAll);
  i18n.global.setLocaleMessage("en", enLocaleAll);
}
